package com.nulldev.util.web.HttpServer3.extensions.websocket.frame;

import java.io.Closeable;
import java.io.IOException;

public interface FrameReader extends Closeable {
	Frame read() throws IOException;

	/**
	 * This will read the input steam until the buffer is filled or end of file is
	 * detected or IOException occurs.
	 * 
	 * @param buffer
	 * @throws IOException
	 */
	void read(byte[] buffer) throws IOException;
}